<div id = "select_problem">
<%if contest%>
  <% form_tag :action => :do_edit_problem do %>
    <% options = {}%>
    <% Problem.find(:all,:conditions => {:contest_id => contest}).each{|t| options[t.name] = t.problem_id}%>
    Select problem:
    <% if problem%>
      <%= select_tag :id, options_for_select(options,problem.problem_id.to_i)%>
    <%else%>
      <%= select_tag :id, options_for_select(options)%>
    <%end%>
    <%= submit_tag "Edit problem"%>
  <%end%>
<%end%>
</div>
